From 19e5c222b823de00b37b6435a16eb65f220398f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sun, 20 Jan 2008 22:26:08 +0000 Subject: [PATCH] Always use BablFishPath's for accepted conversions. The path construction code is the location of the regression test, an earlier (now unneeded) optimization allowed using the first and best conversion available. The (not in bugzilla afair) bug manifest by this depended on the order of .so's on the file system to manifest itself. * babl/babl-fish.c: (go_fishing): only accepts paths when we go fishing for existing conversions. (babl_fish): elaborated a comment about why we avoid shortcut conversions and only paths. svn path=/trunk/; revision=275 --- ChangeLog | 14 ++++++++++++++ babl/babl-fish.c | 8 +++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0591e28..74324d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-01-20 Øyvind Kolås + + Always use BablFishPath's for accepted conversions. The path + construction code is the location of the regression test, an + earlier (now unneeded) optimization allowed using the first + and best conversion available. The (not in bugzilla afair) bug + manifest by this depended on the order of .so's on the file system + to manifest itself. + + * babl/babl-fish.c: (go_fishing): only accepts paths when we go + fishing for existing conversions. + (babl_fish): elaborated a comment about why we avoid shortcut + conversions and only paths. + 2008-01-17 Øyvind Kolås Applied patch from Deji Akingunola to make babl diff --git a/babl/babl-fish.c b/babl/babl-fish.c index 7976912..d0c148f 100644 --- a/babl/babl-fish.c +++ b/babl/babl-fish.c @@ -67,8 +67,8 @@ go_fishing (const Babl *source, Babl *item = db->items[i]; if ((void *) source == (void *) item->fish.source && (void *) destination == (void *) item->fish.destination && - (item->class_type != BABL_FISH_REFERENCE || - source == destination) + (item->class_type == BABL_FISH_PATH || /* accept only paths */ + source == destination) /* or memcpy */ ) { return item; @@ -128,7 +128,9 @@ babl_fish (const void *source, } if (0) /* do not accept shortcut conversions, since there might be - a faster path + a faster path, besides the shortcut conversion might + have a too large error, let's rely on the paths for + error checking. */ { Babl *shortcut_conversion; -- 2.30.2